// #include "ThreadPool_V1.hpp"
#include "ThreadPool_V2.hpp"
#include "task.hpp"
#include <memory>

int main()
{
    std::unique_ptr<ThreadPool<Task>> tp(new ThreadPool<Task>);
    tp->init();
    tp->start();
    //tp->check();
    while(true)
    {
        int x,y;
        char op;
        std::cout<<"please Enter x ";
        std::cin>>x;
        std::cout<<"please Enter y ";
        std::cin>>y;
        std::cout<<"please Enter op(+-*/%)";
        std::cin>>op;

        Task t(x,y,op);

        tp->pushTask(t);
        sleep(1);

    }
    return 0;
}